From f20f3c8ece5c10fa7626f253d28f570a43b23208 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 7 Oct 2009 08:07:06 +0100 Subject: [PATCH] x86 hvm: On failed hvm_send_assist_req(), io emulation state should be reset to HVMIO_none, as no IO is in flight. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/emulate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index ac3f807c22..9168158e0b 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -163,8 +163,11 @@ static int hvmemul_do_io( curr->arch.hvm_vcpu.io_state = HVMIO_none; break; case X86EMUL_UNHANDLEABLE: - rc = (!hvm_send_assist_req(curr) || (p_data != NULL) - ? X86EMUL_RETRY : X86EMUL_OKAY); + rc = X86EMUL_RETRY; + if ( !hvm_send_assist_req(curr) ) + curr->arch.hvm_vcpu.io_state = HVMIO_none; + else if ( p_data == NULL ) + rc = X86EMUL_OKAY; break; default: BUG(); -- 2.30.2